<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0"
        />
        <title>Document</title>
    </head>
    <body>
        <script>
            // 打开数据库
            const request = window.indexedDB.open('testDataBase', 1)

            request.onerror = function (event) {
                console.log('数据库打开报错', event)
            }

            request.onsuccess = function (event) {
                console.log('数据库打开成功', event)
            }
        </script>
    </body>
</html>
